import { createRouter, createWebHashHistory } from "vue-router";
import IndexView from "../views/IndexView.vue";
import LoginView from "@/views/LoginView.vue";
import DoctorView from "@/views/DoctorView.vue";

const routes = [
  {
    path: "/index",
    name: "index",
    component: IndexView,
    //     todo 这里嵌套子页面
    children: [
      {
        path: "doctor",
        name: "doctor",
        component: DoctorView,
      },
    ],
  },
  {
    path: "/login",
    name: "login",
    component: LoginView,
  },
];

const router = createRouter({
  history: createWebHashHistory(),
  routes,
});

export default router;
